package com.kun.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.kun.entity.SysMenu;
import com.kun.entity.SysPermission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author kun.li
 */
@Mapper
public interface SysMenuMapper  extends BaseMapper<SysMenu> {


    @InterceptorIgnore(tenantLine = "true")
    List<SysPermission> selectPermission(@Param("menuType") Integer menuType, @Param("userId") String userId, @Param("tenantId") String tenantId);
    @InterceptorIgnore(tenantLine = "true")
    List<SysMenu> selectMenuList(@Param("menuType") Integer menuType,@Param("userId") String userId,@Param("menuIds") List<String> menuIds);

    List<SysMenu> selectListByRoleList(@Param("roleId") String roleId);

    @InterceptorIgnore(tenantLine = "true")
    List<SysPermission> selectTenantPermission(@Param("menuType") Integer menuType, @Param("userId")String userId,@Param("menuIds") List<String> menuIds);
    @InterceptorIgnore(tenantLine = "true")
    List<SysPermission> selectPermissionSuperAdmin(@Param("menuType") Integer menuType, @Param("userId") String userId);
    @InterceptorIgnore(tenantLine = "true")
    List<SysMenu> selectTenantMenuList(@Param("menuType") Integer menuType, @Param("tenantId") String tenantId, @Param("userId") String userId);


    List<SysMenu> selectMenuListByUserId(String userId);


}
